<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>用户增加</title>
	<link rel="stylesheet" href="__STATIC__/bs/css/bootstrap.css">
	<script type="text/javascript" src="__STATIC__/bs/js/jquery.min.js"></script>
	<script type="text/javascript" src="__STATIC__/bs/js/bootstrap.js"></script>
	<link rel="stylesheet" type="text/css" href="__STATIC__/bs/validform/style.css">
	<script type="text/javascript" src="__STATIC__/bs/validform/Validform_v5.3.2_min.js"></script> 
	<!-- <script type="text/javascript" src="__STATIC__/js/admin/adminManage/adminAdd.js"></script> -->
	<style type="text/css">
		body{
			margin:0;
			padding:0;
			background:#eee;
		}
	</style>
</head>
<body>
	<div class="container">
		
		<h2 class="text-center">用户增加</h2>
		<form id="myForm" action="/admin_manage" method="post" class="form-horizontal">
				<div class="form-group">
					<label for="userName" class="col-sm-2 col-sm-offset-2 control-label">用户名：</label>
					<div class="col-sm-4">
						<input name="userName" id="userName" type="text" class="form-control" >
					</div>
					<div class="col-sm-4">
						<span class="Validform_checktip">用户名以字母开头，4-8个字符</span>
					</div>
				</div>
				<div class="form-group">
					<label for="passWord" class="col-sm-2 col-sm-offset-2 control-label">密码：</label>
					<div class="col-sm-4">
						<input type="password" name="passWord" id="passWord" class="form-control">
					</div>
					<div class="col-sm-4">
						<span class="Validform_checktip">密码为4~8位字符</span>
					</div>
				</div>
				<div class="form-group">
					<label for="c_passWord" class="col-sm-2 col-sm-offset-2 control-label">确认密码：</label>
					<div class="col-sm-4">
						<input type="password" name="c_passWord" id="c_passWord" class="form-control">
					</div>
					<div class="col-sm-4">
						<span class="Validform_checktip"></span>
					</div>
				</div>
				<div class="form-group">
					<label for="name" class="col-sm-2 col-sm-offset-2 control-label">姓名：</label>
					<div class="col-sm-4">
						<input type="text" id="name" name="name" class="form-control">
					</div>
					<div class="col-sm-4">
						<span class="Validform_checktip">姓名为2~8位字符</span>
					</div>
				</div>
			
				<div class="form-group">
					<label class="col-sm-2 col-sm-offset-2 control-label">
						<input class="btn btn-success btn-block" type="submit" value="提交">
					</label>
					<label class="col-sm-2 control-label">
						<input class="btn btn-warning btn-block" type="reset" value="重置">
					</label>
					
				</div>
		</form>
	</div>
</body>
<script type="text/javascript">
	$(function(){
	var form=$("#myForm").Validform({
		tiptype:2,//validform初始化
	});
	
	form.addRule([
		{
			ele:"#userName",
		    datatype:"/^[a-zA-Z]{1}[a-zA-Z0-9]{3,7}$/",
		    ajaxurl:"/admin_manage_con/ajaxckadmin",
		    nullmsg:"请输入用户名！",
		    errormsg:"用户名以字母开头，4-8个字符，请重新输入！"
		},
		{
			ele:"#passWord",
			datatype:"s4-8",
			nullmsg:"请输入密码",
			errormsg:"密码为4~8位字符，请重新输入！"
		},
		{
			ele:"#c_passWord",
			datatype:"*",
			recheck:"passWord",
			mullmsg:"请输入确认密码！",
			errormsg:"两次输入的密码不一致，请重新输入！"
		},
		{
			ele:"#name",
			datatype:"s2-8",
			mullmsg:"请输入姓名！",
			errormsg:"姓名为2~8位字符，请重新输入！"
		}
	]);
	
});

</script>
</html>